public class Test {
    public static void main(String[] args) {
        String str="ABCDEF";
        int num=Integer.parseInt(str,16);
        System.out.println(num);
    }
}
